package com.boguan.device.domain;

import com.boguan.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * device_alarm_log
 *
 * @author
 */
public class DeviceAlarmLog extends BaseEntity {
    /**
     * 报警id 主键
     */
    private Long id;

    /**
     * 设备id
     */
    private Long deviceId;

    /**
     * 报警属性名称
     */
    private String paramName;

    /**
     * 报警值
     */
    private String value;

    /**
     * 参数的标识
     */
    private String identifier;

    /**
     * 异常状态 1异常 2无异常
     */
    private Integer errorState;

    /**
     * 报警状态  1未处理，2已处理
     */
    private Integer status;

    /**
     * 报警级别  1预警，2严重预警，3告警
     */
    private Integer alarmLevel;

    /**
     * 报警级别查询数组
     */
    private Integer[] alarmLevels;

    /**
     * 报警时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date alarmTime;

    /**
     * 报警原因
     */
    private String alarmCause;

    /**
     * 报警位置
     */
    private String alarmLocation;

    /**
     * 恢复时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date recoverTime;

    /**
     * 确认时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date affirmTime;

    /**
     * 确认人的id
     */
    private Long affirmUser;

    /**
     * 确认意见
     */
    private String affirmOpinion;

    /**
     * 确认处理的图片上传 最多8张图片  格式： 图片1，图片2，图片3，。。。。图片9
     */
    private String affirmIcon;

    private String deviceName;

    private String deviceNum;

    private String userName;

    private String nickName;

    private String msgType;

    private static final long serialVersionUID = 1L;


    public Integer[] getAlarmLevels() {
        return alarmLevels;
    }

    public void setAlarmLevels(Integer[] alarmLevels) {
        this.alarmLevels = alarmLevels;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getIdentifier() {
        return identifier;
    }

    public void setIdentifier(String identifier) {
        this.identifier = identifier;
    }

    public Integer getErrorState() {
        return errorState;
    }

    public void setErrorState(Integer errorState) {
        this.errorState = errorState;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getAlarmLevel() {
        return alarmLevel;
    }

    public void setAlarmLevel(Integer alarmLevel) {
        this.alarmLevel = alarmLevel;
    }

    public Date getAlarmTime() {
        return alarmTime;
    }

    public void setAlarmTime(Date alarmTime) {
        this.alarmTime = alarmTime;
    }

    public String getAlarmCause() {
        return alarmCause;
    }

    public void setAlarmCause(String alarmCause) {
        this.alarmCause = alarmCause;
    }

    public String getAlarmLocation() {
        return alarmLocation;
    }

    public void setAlarmLocation(String alarmLocation) {
        this.alarmLocation = alarmLocation;
    }

    public Date getRecoverTime() {
        return recoverTime;
    }

    public void setRecoverTime(Date recoverTime) {
        this.recoverTime = recoverTime;
    }

    public Date getAffirmTime() {
        return affirmTime;
    }

    public void setAffirmTime(Date affirmTime) {
        this.affirmTime = affirmTime;
    }

    public Long getAffirmUser() {
        return affirmUser;
    }

    public void setAffirmUser(Long affirmUser) {
        this.affirmUser = affirmUser;
    }

    public String getAffirmOpinion() {
        return affirmOpinion;
    }

    public void setAffirmOpinion(String affirmOpinion) {
        this.affirmOpinion = affirmOpinion;
    }

    public String getAffirmIcon() {
        return affirmIcon;
    }

    public void setAffirmIcon(String affirmIcon) {
        this.affirmIcon = affirmIcon;
    }


    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceNum() {
        return deviceNum;
    }

    public void setDeviceNum(String deviceNum) {
        this.deviceNum = deviceNum;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getMsgType() {
        return msgType == null ? "alarm" : msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }
}